#pragma once

template <typename Key, typename Val, size_t N>
struct _hHashVectorNode;
constexpr size_t _HashVectorParam = 2;
template <typename Key, typename Val>
using _HashVectorNode = _hHashVectorNode<Key, Val, _HashVectorParam>;
template <typename Key, typename Val>
class _hHashVectorIterator;

template <typename Key, typename Val>
struct hHashVector
{
	_HashVectorNode<Key, Val> _node;
	using Iter = _hHashVectorIterator<Key, Val>;

	template<typename... Args>
	Iter emplace(Key k, Args... args) { return _node.emplaceCallBack(this, false, k, args...); }
	Iter find(Key k);
	Iter begin();
	Iter end();

	Val& operator[] (Key k) { return emplace(k); }
	std::ostream& fillDebug(std::ostream& os, uint8_t idx = 0) const;
};

#include "hHashVectorImpl.h"